package com.red.star.macalline.data.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Table;
import javax.persistence.Transient;

/**
 * @author AMGuo
 * @Description 广告组合
 * @date 2018/03/26 13:06
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Table(name = "t_ad_group")
public class AdGroup extends BaseEntity {

	/**
	 * 名称
	 */
	private String name;

	/**
	 * 标题
	 */
	private String title;

	/**
	 * 创建人fansId
	 */
	private Integer createFansId;

	/**
	 * 创建人employeeId
	 */
	private Integer employeeId;

	/**
	 * 创建人名称
	 */
	@Transient
	private String fansDisplayName;

	/**
	 * 创建人手机号
	 */
	@Transient
	private String mobile;

	/**
	 * 创建人openid
	 */
	@Transient
	private String openId;

	/**
	 * 所属商户id
	 */
	private Integer merchantId;

	/**
	 * 商户名称
	 */
	@Transient
	private String merchantName;

	/**
	 * 品牌名称
	 */
	@Transient
	private String brandName;

	/**
	 * 所属商场
	 */
	@Transient
	private String mallName;

	/**
	 * 所在城市
	 */
	@Transient
	private String city;

	/**
	 * 所属中小区
	 */
	@Transient
	private String smallRegion;

	/**
	 * 所属大区/独立中区
	 */
	@Transient
	private String bigRegion;

	/**
	 * 状态(启用中，已停用)
	 */
	private String status;

	/**
	 * 展示图地址
	 */
	private String showImage;

	/**
	 * 主页面地址
	 */
	private String mainImage;

	/**
	 * 展示时间（单位：秒）
	 */
	private Integer showTime;

	/**
	 * 所属中小区
	 */
	@Transient
	private String smallRegionCode;

	/**
	 * 所属大区/独立中区
	 */
	@Transient
	private String bigRegionCode;

	/**
	 * 创建时间字符串
	 */
	@Transient
	private String createTimeString;

	@Transient
	private Integer showPV;
	@Transient
	private Integer showUV;
	@Transient
	private Integer mainPV;
	@Transient
	private Integer mainUV;

	@Transient
	private Integer chatCount;

	public AdGroup(String name, String title, Integer createFansId, Integer employeeId, Integer merchantId, String status,
	               String showImage, String mainImage, Integer showTime) {
		this.name = name;
		this.title = title;
		this.createFansId = createFansId;
		this.employeeId = employeeId;
		this.merchantId = merchantId;
		this.status = status;
		this.showImage = showImage;
		this.mainImage = mainImage;
		this.showTime = showTime;
	}
}
